﻿<UserControl x:Class="BingMapBrowser.RecordView"
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
	xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
	xmlns:sdk="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data"
	xmlns:loc="clr-namespace:BingMapBrowser"
	mc:Ignorable="d"
	d:DesignHeight="300" d:DesignWidth="200">
	
	<Grid x:Name="LayoutRoot" Background="White">
		<Grid.RowDefinitions>
			<RowDefinition Height="30"></RowDefinition>
			<RowDefinition Height="30"></RowDefinition>
			<RowDefinition Height="*"></RowDefinition>
		</Grid.RowDefinitions>
		<StackPanel Orientation="Horizontal" HorizontalAlignment="Left" Grid.Row="0">
			<TextBlock Text="{Binding EntityDisplayName}" Padding="2" MinWidth="80" Margin="10,0,0,0"></TextBlock>
		</StackPanel>
		<StackPanel Orientation="Horizontal" Name="linksPanel" Grid.Row="1" Margin="10,0,10,0">
			<Button Name="formButton" Content="Form" Click="LinkViewButton_Click" MinWidth="30" Margin="3"></Button>
			<ListBox Name="linksBox" BorderThickness="0">
				<ListBox.ItemsPanel>
					<ItemsPanelTemplate>
						<StackPanel Orientation="Horizontal"></StackPanel>
					</ItemsPanelTemplate>
				</ListBox.ItemsPanel>
				<ListBox.ItemTemplate>
					<DataTemplate>
						<loc:LinkViewButton MinWidth="30" MaxWidth="80" Click="link_Click" Content="{Binding Text}" HorizontalAlignment="Center"></loc:LinkViewButton>
					</DataTemplate>
				</ListBox.ItemTemplate>
			</ListBox>
			<!--<loc:LinkViewButton x:Name="link0" MaxWidth="80" Click="link_Click"></loc:LinkViewButton>
			<loc:LinkViewButton x:Name="link1" MaxWidth="80" Click="link_Click"></loc:LinkViewButton>
			<loc:LinkViewButton x:Name="link2" MaxWidth="80" Click="link_Click"></loc:LinkViewButton>-->
		</StackPanel>
		<StackPanel Orientation="Vertical" Name="listPanel" Grid.Row="2" Margin="10,10,10,10">
			<sdk:DataGrid Name="listGrid" AutoGenerateColumns="False" VerticalScrollBarVisibility="Visible" MaxHeight="100">
				<sdk:DataGrid.Columns>
					<sdk:DataGridTextColumn Header="Field" IsReadOnly="True" Binding="{Binding Text}"></sdk:DataGridTextColumn>
					<sdk:DataGridTextColumn Header="Value" IsReadOnly="True" Binding="{Binding Value}"></sdk:DataGridTextColumn>
				</sdk:DataGrid.Columns>
			</sdk:DataGrid>
		</StackPanel>
	</Grid>
</UserControl>
